/*
 * @Author: xuzehan 123@qq.com
 * @Date: 2022-07-12 16:04:57
 * @LastEditors: xuzehan 123@qq.com
 * @LastEditTime: 2022-07-13 15:41:16
 * @FilePath: \vue2-basic\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// import Vue from 'vue'
// import Router from 'vue-router'

// Vue.use(Router)

// export default new Router({
//   routes: [
//     {
//       path: '/',
//       name: 'Home',
//       component: () => import('@/views/Home.vue'),
//     },
//     {
//       path: '/liquidFill',
//       name: 'LiquidFill',
//       component: () => import('@/views/echarts/liquidFill.vue'),
//     }
//   ]
// })

import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

export const routes = [

  {
    path: '/',
    redirect: '/liquidFill',
    hidden: true
  },
  {
    path: '/echarts',
    name: 'Echarts',
    meta: { title: 'echarts' },
    component: () => import('@/views/Home.vue'),
    children: [
      {
        path: '/liquidFill',
        name: 'LiquidFill',
        component: () => import('@/views/echarts/liquidFill.vue'), meta: { title: '水球百分比' },
      },
    ]
  },
  {
    path: '/mock',
    name: 'Mock',
    meta: { title: 'Mock' },
    component: () => import('@/views/Home.vue'),
    children: [
      {
        path: '/mock',
        name: 'Mock',
        component: () => import('@/views/mock/mock.vue'),
        meta: { title: 'mock数据' },
      }
    ]
  },


]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router